package com.muse.designpatterns.decorator;

public class Egg extends AccessoriesDecorator{

    private Food food;

    public Egg(Food food) {
        this. food = food;
    }

    @Override
    public double cost() {
        System.out.println("添加鸡蛋"+1+"元");
        return 1+food.cost();
    }

    @Override
    public String getDescription() {
        return "鸡蛋";
    }
}
